<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>科技登录界面</title>
    <style>
        :root {
            --primary: #00ff88;
            --secondary: #2196f3;
            --background: #0a192f;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', sans-serif;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: var(--background);
            overflow: hidden;
        }

        .container {
            position: relative;
            width: 380px;
            padding: 40px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 10px;
            box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .container::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 150%;
            height: 100%;
            background: linear-gradient(60deg, transparent,
                    var(--primary), transparent);
            transform: skewX(-30deg);
            transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .container:hover::before {
            left: 120%;
        }

        .container {
            overflow: hidden;
        }

        .form-group {
            position: relative;
            margin: 30px 0;
        }

        .form-group input {
            width: 100%;
            padding: 10px 0;
            font-size: 16px;
            color: #fff;
            border: none;
            border-bottom: 1px solid #fff;
            outline: none;
            background: transparent;
            transition: 0.5s;
        }

        .form-group label {
            position: absolute;
            left: 0;
            padding: 10px 0;
            font-size: 16px;
            color: rgba(255, 255, 255, 0.7);
            pointer-events: none;
            transition: 0.5s;
        }

        .form-group input:focus ~ label,
        .form-group input:valid ~ label {
            top: -20px;
            font-size: 12px;
            color: var(--primary);
        }

        .form-group input:focus,
        .form-group input:valid {
            border-bottom: 1px solid var(--primary);
        }

        button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            border: none;
            border-radius: 5px;
            color: #fff;
            font-size: 16px;
            cursor: pointer;
            transition: 0.5s;
            position: relative;
            overflow: hidden;
        }

        button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.4),
                transparent
            );
            transition: 0.5s;
        }

        button:hover::before {
            left: 100%;
        }

        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
    </style>
</head>
<body>
    <div class="container">
        <form id="loginForm">
            <h2 style="color: var(--primary); text-align: center; margin-bottom: 30px;">系统登录</h2>
            
            <div class="form-group">
                <input type="text" required>
                <label>用户名</label>
            </div>
            
            <div class="form-group">
                <input type="password" required>
                <label>密码</label>
            </div>

            <button type="submit">登录</button>
        </form>
    </div>

    <script>
        document.getElementById('loginForm').onsubmit = function(e) {
            e.preventDefault();
            
            // 简单表单验证
            const inputs = document.querySelectorAll('input');
            let isValid = true;
            
            inputs.forEach(input => {
                if (!input.value.trim()) {
                    input.style.borderColor = '#ff0000';
                    isValid = false;
                }
            });

            if (isValid) {
                // 添加加载效果
                const btn = document.querySelector('button');
                btn.innerHTML = '登录中...';
                btn.style.opacity = '0.7';
                
                // 模拟登录请求
                setTimeout(() => {
                    btn.innerHTML = '登录成功 ✓';
                    btn.style.background = '#4CAF50';
                    setTimeout(() => {
                        window.location.href = '#';
                    }, 1000);
                }, 1500);
            }
        };

        // 输入框动态效果
        document.querySelectorAll('input').forEach(input => {
            input.addEventListener('input', () => {
                if (input.value.trim()) {
                    input.style.borderColor = 'var(--primary)';
                }
            });
        });
    </script>
</body>
</html>
